package com.hsurosy.hsuchain.nft.base.exception;

/**
 * 数据库操作错误码枚举
 *
 * @Author Hsu琛君珩
 * @Date 2024-10-04 17:31
 * @Description
 * @Version: v1.0.0
 */
public enum RepoErrorCode implements ErrorCode {

    /**
     * 未知错误
     */
    UNKNOWN_ERROR("UNKNOWN_ERROR", "未知错误"),

    /**
     * 数据库插入失败
     */
    INSERT_FAILED("INSERT_FAILED", "数据库插入失败"),

    /**
     * 数据库更新失败
     */
    UPDATE_FAILED("UPDATE_FAILED", "数据库更新失败");

    /**
     * 错误码
     */
    private final String code;

    /**
     * 错误信息
     */
    private final String message;

    RepoErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
